#ifndef AVALON_UIDCLIENTCHANNEL_HPP
#define AVALON_UIDCLIENTCHANNEL_HPP
#include "Avalon/IO/Channel.hpp"
#include "Avalon/Services/ClientChannelMixin.hpp"
#include "Avalon/UidService/UidService.hpp"

namespace Avalon {
namespace UidService {

  /*! \class UidClientChannel
   *  \brief A Channel used to represent a UidClient.
   *  \author Kamal Mansouri <kranar@hotmail.com>
   */
  class UidClientChannel : public IO::Channel,
      private Services::ClientChannelMixin {
    public:

      //! Constructs a UidClientChannel.
      /*!
        \param channel The existing Channel to the UidClient.
      */
      UidClientChannel(IO::Channel* channel);

      virtual ~UidClientChannel();

      virtual IO::Connection& GetConnection();

      virtual IO::Reader& GetReader();

      virtual IO::Writer& GetWriter();

      using ClientChannelMixin::IsLoggedIn;
      using ClientChannelMixin::GetAccount;
      using ClientChannelMixin::SetAccount;
      using ClientChannelMixin::GetConnectionState;
      using ClientChannelMixin::GetTaskQueue;

    private:
      boost::scoped_ptr<IO::Channel> m_channel;
  };
}
}

#endif // AVALON_UIDCLIENTCHANNEL_HPP
